import Mock from "mockjs";

Mock.mock("detail/information", "get", (options) => {
  let item = JSON.parse(options.body).detailId;
  
  let bodyData = [
    // 城市列表
    {
      "id": "0001",
      // 城市头部信息
      "HeadList": {
        "sightName": "大连圣亚海洋世界(AAAA景区)",
        "bannerImg": "http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_600x330_bf9c4904.jpg",
        "gallaryImgs": ["http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_800x800_70debc93.jpg", "http://img1.qunarzz.com/sight/p0/1709/76/7691528bc7d7ad3ca3.img.png_800x800_9ef05ee7.png"],
        "information": {
          "address": "辽宁省-大连市-沙河口区-中山路608-6-8号(星海广场西500米)",
          "time": "开放时间 09:00-16:00",
          "evaluation": {
            "score": "4.9",
            "comments": "18576",
          }
        }
      },
      // 城市内容显示列表
      "categoryList": [
        {
          "title": "促销票",
          "content": [ // 内容
            {  // 盒子1
              "title": "大连圣亚海洋世界五馆单人票",  // 标题
              "details": "海洋世界、极地世界、珊瑚世界、深海传奇、恐龙传奇；王牌项目：118米海底通道，全景式南极企鹅岛",  // 介绍
              "price": "98.8",  // 价钱
            },
            {  // 盒子2
              "title": "大连圣亚海洋世界五馆双人票",
              "details": "海洋世界、极地世界、珊瑚世界、深海传奇、恐龙传奇；王牌项目：118米海底通道，全景式南极企鹅岛",
              "price": "188.0",
            }
          ]
        }, 
        {
          "title": "热销联票",
          "content": [{
            "title": "大连圣亚海洋世界（含5馆）+大连世界动物园成人票",
            "price": "240",
          },{
            "title": "大连圣亚海洋世界（含5馆）+大连世界动物园成人票",
            "price": "240",
          }]
        }, 
        {
          "title": "一日游",
          "connent": [{
            "title": "大连圣亚海洋世界+棒棰岛+东海世界1日游",
            "price": "350",
          },{
            "title": "奥林匹克广场+好友广场+大连市人民广场+中山广场+人民广场+圣地广场+网牌广场",
            "price": "350",
          }]
        }
      ]
    },
    {
      "id": "0002",
      "sightName": "大连圣亚海洋世界(BBBB景区)",
      "bannerImg": "http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_600x330_bf9c4904.jpg",
      "gallaryImgs": ["http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_800x800_70debc93.jpg", "http://img1.qunarzz.com/sight/p0/1709/76/7691528bc7d7ad3ca3.img.png_800x800_9ef05ee7.png"],
      "categoryList": [{
        "title": "成人票",
        "children": [{
          "title": "成人三馆联票",
          "children": [{
            "title": "成人三馆联票 - 某一连锁店销售"
          }]
        },{
          "title": "成人五馆联票"
        }]
      }, {
        "title": "学生票"
      }, {
        "title": "儿童票"
      }, {
        "title": "特惠票"
      }]
    },
    {
      "id": "0003",
      "sightName": "大连圣亚海洋世界(BBBB景区)",
      "bannerImg": "http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_600x330_bf9c4904.jpg",
      "gallaryImgs": ["http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_800x800_70debc93.jpg", "http://img1.qunarzz.com/sight/p0/1709/76/7691528bc7d7ad3ca3.img.png_800x800_9ef05ee7.png"],
      "categoryList": [{
        "title": "成人票",
        "children": [{
          "title": "成人三馆联票",
          "children": [{
            "title": "成人三馆联票 - 某一连锁店销售"
          }]
        },{
          "title": "成人五馆联票"
        }]
      }, {
        "title": "学生票"
      }, {
        "title": "儿童票"
      }, {
        "title": "特惠票"
      }]
    },
    {
      "id": "0004",
      "sightName": "大连圣亚海洋世界(BBBB景区)",
      "bannerImg": "http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_600x330_bf9c4904.jpg",
      "gallaryImgs": ["http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_800x800_70debc93.jpg", "http://img1.qunarzz.com/sight/p0/1709/76/7691528bc7d7ad3ca3.img.png_800x800_9ef05ee7.png"],
      "categoryList": [{
        "title": "成人票",
        "children": [{
          "title": "成人三馆联票",
          "children": [{
            "title": "成人三馆联票 - 某一连锁店销售"
          }]
        },{
          "title": "成人五馆联票"
        }]
      }, {
        "title": "学生票"
      }, {
        "title": "儿童票"
      }, {
        "title": "特惠票"
      }]
    },
    {
      "id": "0005",
      "sightName": "大连圣亚海洋世界(BBBB景区)",
      "bannerImg": "http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_600x330_bf9c4904.jpg",
      "gallaryImgs": ["http://img1.qunarzz.com/sight/p0/201404/23/04b92c99462687fa1ba45c1b5ba4ad77.jpg_800x800_70debc93.jpg", "http://img1.qunarzz.com/sight/p0/1709/76/7691528bc7d7ad3ca3.img.png_800x800_9ef05ee7.png"],
      "categoryList": [{
        "title": "成人票",
        "children": [{
          "title": "成人三馆联票",
          "children": [{
            "title": "成人三馆联票 - 某一连锁店销售"
          }]
        },{
          "title": "成人五馆联票"
        }]
      }, {
        "title": "学生票"
      }, {
        "title": "儿童票"
      }, {
        "title": "特惠票"
      }]
    },
  ];
  let txt = {};

  for(let obj of bodyData) { if(obj.id === item) txt = obj; }
  
  return {
    code: 200,
    ret: true,
    data: txt,  
    detailId: item,
  }
})
